/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package br.ufrn.dimap.projetodetalhadodesoftware.chatrmi.model.reference;

import br.ufrn.dimap.projetodetalhadodesoftware.chatrmi.controller.exception.ObjectNotFoundExeption;
import br.ufrn.dimap.projetodetalhadodesoftware.chatrmi.model.register.Register;
import java.net.MalformedURLException;
import java.rmi.NotBoundException;
import java.rmi.Remote;
import java.rmi.RemoteException;

/**
 *
 * @author Jorge
 */
public abstract  class Reference {

    protected Reference next;

    public void addNext(Reference reference){
        if(next != null){
            next.addNext(reference);
        }else{
            next = reference;
        }
    }


    abstract Remote getReference(int actor, String url) throws NotBoundException, MalformedURLException, RemoteException, ObjectNotFoundExeption;
}
